<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<html>
  <head>
    
    <title>readnote hello</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
 <body>
   
   <s:form  action="index" namespace="/center/userBook" method="post">
	<div id="query">
		书籍名称：<s:textfield name="query.query['lk_book.title_s']"  />
		书籍描述：<s:textfield name="query.query['lk_book.content_s']"  />
		
		<input type="submit" value="查询"/>
	</div>
	</s:form>
	<!--/end page query -->
	
	<div id="pageItems">
	<table id="pageTable">
		<tr>
			<th id="id">序号</th>
			<th id="id">书籍ID</th>
			<th id="id">用户ID</th>
			<th>书籍名称</th>
			<th>用户登录名称</th>
			<!-- 
			<th>书名</th>
			<th>描述</th>
			<th>封面地址</th>
			 -->
			<th>行为</th>
		</tr>
		<s:iterator value="page.items">
		<tr>
			<td><s:property value="id"/></td>
			<td><s:property value="book.id"/></td>
			<td><s:property value="user.id"/></td>
			<td><s:property value="book.title"/></td>
			<td><s:property value="user.loginName"/></td>
			<!-- 
			<td><s:property value="title"/></td>
			<td><s:property value="content"/></td>
			<td><s:property value="bookface"/></td>
			 -->
			<td>
			
			<s:if test="getLoginInfo().isLogin()">
			<a href="
			<s:url action="index" namespace="/center/userNote"><s:param name="userBook.id" value="%{id}" /></s:url>
			">查看本书笔记</a>
			|
			<a href="
			<s:url action="input" namespace="/center/userNote"><s:param name="userBook.id" value="%{id}" /></s:url>
			">添加读书笔记</a>
			</s:if>
			<s:else>
			<a href="
			<s:url action="index" namespace="/center/allUserNote"><s:param name="userBook.id" value="%{id}" /></s:url>
			">查看本书笔记</a>
			
			</s:else>
			
			</td>
		</tr>
		</s:iterator>
	</table>
	</div>
	<!--/end page item -->
	
	<!-- 通用分页 -->
	<%@include file="\WEB-INF\template\page\pageButton.jsp" %>	
	<!--/end page button -->
	

</body>
</html>
